<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            width: 1190px;
            height: 80px;
            background-image: url('./luzhou.jpg');
        }

        .cha {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 18px;
            height: 20px;
            background-image: url('./close.jpg');

        }
    </style>
</head>

<body>
    <div class="box">
        <i class="cha"></i>
    </div>
    <script>
        // 获取事件
        var box = document.querySelector('.box');
        var cha = document.querySelector('.cha');
        // 事件类型  事件处理程序
        cha.onclick = function () {
            box.style.display = 'none'
            cha.style.display = 'none'
        }
    </script>
</body>

</html>